﻿@model List<NewsIndia.Models.CategoryMasterModel>
@{
    Layout = null;
    ViewBag.Title = "ShowCategoryTable";
}

<table class="table table-striped table-hover table-bordered " id="tblCategoryGrid" cellspacing="0" width="100%">
    <thead>
        <tr>
            <th class="TextAlign">#</th>
            <th class="TextAlign">Category Name</th>
            <th class="TextAlign">Status</th>
            <th class="TextAlign">Actions</th>

        </tr>
    </thead>
    <tbody>
        @{   var count = 1;}
        @foreach (var category in Model)
        {

            var classInfo = category.IsVisible ? "success" : "danger";

            <tr class="@classInfo">
                <td class="TextAlign RowTextCss">@count</td>
                <td class="TextAlign RowTextCss">@category.CategoryName</td>
                <td class="TextAlign RowTextCss">@(category.IsVisible ? "Showing" : "Not Showing")</td>
                <td class="TextAlign">

                    <a class="AnchorCssRemove" data-toggle="modal" data-target="#popup" data-whatever="Anchor" data-categoryid="@category.ID">
                        <img class="ActionImages" src="~/Content/Images/Edit.png" />
                    </a>
                    <a class="AnchorCssRemove" style="margin-left: 2px" onclick="RemoveCategory(@category.ID)"><img class="ActionImages" src="~/Content/Images/Delete.png" /></a>
                </td>
            </tr>

            count++;
        }


    </tbody>
</table>



